# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 172
n 172(None)[stack.back_to_menu(context['menu'])
context['menu'].stop()
stack.push_menu(thumbnail_menu)
loader.hide()
]:
	i: 112(), 143(), 170(AE)
	o: 

nname: 170
n 170(None)[]:
	i: 133(f)
	o: 172(AE)

nname: 143
n 143(None)[thumbnail_menu.select(thumbnail_menu.choices[0])
]:
	i: 133(t)
	o: 172()

nname: 133
n 133(<dummy_ex3> EXC_MATCH ValueError)[]:
	i: 0(except)
	o: 143(t), 170(f)

nname: 112
n 112(None)[thumbnail_menu.select(context['selected'])
]:
	i: 0(try)
	o: 172()

nname: 0
n 0(None)[loader = LoadingWindow()
loader.show()
from pygui.menu.menu import ThumbnailNavigator
from copy import copy
thumbnail_menu = ThumbnailNavigator('thumbnail_menu', folder=copy(context['parent']), universe=context['menu'].universe, type='%s_thumbnail' % context['menu'].type)
]:
	i: 
	o: 112(try), 133(except)

nname: 133
n 133(None)[except ValueError:
	thumbnail_menu.select(thumbnail_menu.choices[0])
stack.back_to_menu(context['menu'])
context['menu'].stop()
stack.push_menu(thumbnail_menu)
loader.hide()
]:
	i: 0()
	o: 

nname: 0
n 0(None)[loader = LoadingWindow()
loader.show()
from pygui.menu.menu import ThumbnailNavigator
from copy import copy
thumbnail_menu = ThumbnailNavigator('thumbnail_menu', folder=copy(context['parent']), universe=context['menu'].universe, type='%s_thumbnail' % context['menu'].type)
try:
	thumbnail_menu.select(context['selected'])
]:
	i: 
	o: 133()

nname: 0
n 0(None)[loader = LoadingWindow()
loader.show()
from pygui.menu.menu import ThumbnailNavigator
from copy import copy
thumbnail_menu = ThumbnailNavigator('thumbnail_menu', folder=copy(context['parent']), universe=context['menu'].universe, type='%s_thumbnail' % context['menu'].type)
try:
	thumbnail_menu.select(context['selected'])
except ValueError:
	thumbnail_menu.select(thumbnail_menu.choices[0])
stack.back_to_menu(context['menu'])
context['menu'].stop()
stack.push_menu(thumbnail_menu)
loader.hide()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767cdac>}
nname: 0
n 0(None)[from pygui.menu.menu import SearchMenu
stack.back_to_menu(context['menu'])
context['menu'].stop()
search_menu = SearchMenu(universe=context['menu'].universe)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c74c>}
nname: 0
n 0(None)[user_config['security']['show_hidden'] = val
user_config.save()
markerlists().clear_all_markerlists()
stack.back_to_menu(context['menu'])
context['menu'].reload_func()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c88c>}
nname: 0
n 0(None)[user_config['security']['parent_mode'] = False
user_config.save()
markerlists().clear_all_markerlists()
stack.back_to_menu(context['menu'])
context['menu'].reload_func()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c7cc>}
nname: 0
n 0(None)[user_config['security']['parent_mode'] = True
user_config.save()
stack.back_to_menu(context['menu'])
context['menu'].reload_func()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767ce4c>}
nname: 0
n 0(None)[from pygui.menu.menu.security import QuestionAnswerCheckLauncher
QuestionAnswerCheckLauncher(good_code)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767ce4c>}
nname: 0
n 0(None)[from pygui.menu.menu.parameters import SecretCodeCheckMenu
def good_code():
	user_config['security']['parent_mode'] = True
	user_config.save()
	stack.back_to_menu(context['menu'])
	context['menu'].reload_func()

def display_qa():
	from pygui.menu.menu.security import QuestionAnswerCheckLauncher
	QuestionAnswerCheckLauncher(good_code)

pin_menu = SecretCodeCheckMenu(_('Secret code'), action=good_code, cancel_action=display_qa)
pin_menu.show()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c84c>}
nname: 0
n 0(None)[context['menu'].rotate(-1)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c1cc>}
nname: 0
n 0(None)[context['menu'].rotate(1)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c1ec>}
nname: 0
n 0(None)[from __future__ import absolute_import
from pygui.window import LoadingWindow
from pygui.item.containers import ActionContainer
from pygui.config import user_config
from pygui.markerlist import markerlists
def push_thumbnail_menu(context, stack):
	loader = LoadingWindow()
	loader.show()
	from pygui.menu.menu import ThumbnailNavigator
	from copy import copy
	thumbnail_menu = ThumbnailNavigator('thumbnail_menu', folder=copy(context['parent']), universe=context['menu'].universe, type='%s_thumbnail' % context['menu'].type)
	try:
		thumbnail_menu.select(context['selected'])
	except ValueError:
		thumbnail_menu.select(thumbnail_menu.choices[0])
	stack.back_to_menu(context['menu'])
	context['menu'].stop()
	stack.push_menu(thumbnail_menu)
	loader.hide()

def push_search_menu(context, stack):
	from pygui.menu.menu import SearchMenu
	stack.back_to_menu(context['menu'])
	context['menu'].stop()
	search_menu = SearchMenu(universe=context['menu'].universe)

def display_hidden_items(val, context, stack):
	user_config['security']['show_hidden'] = val
	user_config.save()
	markerlists().clear_all_markerlists()
	stack.back_to_menu(context['menu'])
	context['menu'].reload_func()

def switch_to_children_mode(context, stack):
	user_config['security']['parent_mode'] = False
	user_config.save()
	markerlists().clear_all_markerlists()
	stack.back_to_menu(context['menu'])
	context['menu'].reload_func()

def switch_to_parent_mode(context, stack):
	from pygui.menu.menu.parameters import SecretCodeCheckMenu
	def good_code():
		user_config['security']['parent_mode'] = True
		user_config.save()
		stack.back_to_menu(context['menu'])
		context['menu'].reload_func()

	def display_qa():
		from pygui.menu.menu.security import QuestionAnswerCheckLauncher
		QuestionAnswerCheckLauncher(good_code)

	pin_menu = SecretCodeCheckMenu(_('Secret code'), action=good_code, cancel_action=display_qa)
	pin_menu.show()

def rotate_left(context):
	context['menu'].rotate(-1)

def rotate_right(context):
	context['menu'].rotate(1)

from pygui.facilities import l10n
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767586c>}
from __future__ import absolute_import
from pygui.window import LoadingWindow
from pygui.item.containers import ActionContainer
from pygui.config import user_config
from pygui.markerlist import markerlists
def push_thumbnail_menu(context, stack):
	loader = LoadingWindow()
	loader.show()
	from pygui.menu.menu import ThumbnailNavigator
	from copy import copy
	thumbnail_menu = ThumbnailNavigator('thumbnail_menu', folder=copy(context['parent']), universe=context['menu'].universe, type='%s_thumbnail' % context['menu'].type)
	try:
		thumbnail_menu.select(context['selected'])
	except ValueError:
		thumbnail_menu.select(thumbnail_menu.choices[0])
	stack.back_to_menu(context['menu'])
	context['menu'].stop()
	stack.push_menu(thumbnail_menu)
	loader.hide()

def push_search_menu(context, stack):
	from pygui.menu.menu import SearchMenu
	stack.back_to_menu(context['menu'])
	context['menu'].stop()
	search_menu = SearchMenu(universe=context['menu'].universe)

def display_hidden_items(val, context, stack):
	user_config['security']['show_hidden'] = val
	user_config.save()
	markerlists().clear_all_markerlists()
	stack.back_to_menu(context['menu'])
	context['menu'].reload_func()

def switch_to_children_mode(context, stack):
	user_config['security']['parent_mode'] = False
	user_config.save()
	markerlists().clear_all_markerlists()
	stack.back_to_menu(context['menu'])
	context['menu'].reload_func()

def switch_to_parent_mode(context, stack):
	from pygui.menu.menu.parameters import SecretCodeCheckMenu
	def good_code():
		user_config['security']['parent_mode'] = True
		user_config.save()
		stack.back_to_menu(context['menu'])
		context['menu'].reload_func()

	def display_qa():
		from pygui.menu.menu.security import QuestionAnswerCheckLauncher
		QuestionAnswerCheckLauncher(good_code)

	pin_menu = SecretCodeCheckMenu(_('Secret code'), action=good_code, cancel_action=display_qa)
	pin_menu.show()

def rotate_left(context):
	context['menu'].rotate(-1)

def rotate_right(context):
	context['menu'].rotate(1)

from pygui.facilities import l10n
